home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-10-11 | 1.2 KB | 36 lines | [TEXT/MSWD] |
- {This is an FKey that resets the SCC in order to "unfreeze" the mouse after an }
- {errant program has trodden upon it. To install it from LightSpeed Pascal "Build and Save as..."}
- {a code resource with the type 'FKEY' and the single digit number of your choice. Using ResEdit }
- {or an FKey installing program, move the FKEY into your system folder or an application. }
- { Use this FKey when a program crash has frozen your mouse, and only as a last resort! }
- {Hit cloverleaf - shift numeral, and everything should settle down to normal. }
- {Warning: a side effect of this FKEY is to close the printer and modem ports, which may make }
- {it impossible to return to your program if peripherals were in use prior to the crash. }
-
- {This code copyright (c) 1986, Lincoln D. Stein, but free for all non-commercial use. }
-
- UNIT antifreeze;
-
- INTERFACE
- PROCEDURE main;
-
- IMPLEMENTATION
-
- FUNCTION Reset (refnum : integer) : OsErr;
- BEGIN
- IF NoErr <> SerReset(RefNum, baud9600 + stop20 + data8 + noParity) THEN
- sysbeep(5);
- Reset := CloseDriver(RefNum);
- END;
-
- PROCEDURE main;
- VAR
- Out : Integer;
- Err : OsErr;
- BEGIN
- Err := OpenDriver('.BOut', Out);
- Err := Reset(Out);
- Err := OpenDriver('.AOut', Out);
- Err := Reset(Out);
- END;
- END.